package com.zretc.api;

import java.io.FileWriter;
import java.io.IOException;

/* *
 *类名：AlipayConfig
 *功能：基础配置类
 *详细：设置帐户有关信息及返回路径
 *修改日期：2017-04-05
 *说明：
 *以下代码只是为了方便商户测试而提供的样例代码，商户可以根据自己网站的需要，按照技术文档编写,并非一定要使用该代码。
 *该代码仅供学习和研究支付宝接口使用，只是提供一个参考。
 */

public class AlipayConfig {
	
//↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

	// 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
	public static String app_id = "2016103000777959";
	
	// 商户私钥，您的PKCS8格式RSA2私钥
    public static String merchant_private_key = "MIIEuwIBADANBgkqhkiG9w0BAQEFAASCBKUwggShAgEAAoIBAQCJLrbzRB79U7xlYZ5fsO1+keu1XjWQKj6FayHhsjQXgTmGUzVrNjSKlGy5JyZLM/8NOGZrz3xB9tMut4mb0w11dHOTrvNZOqOxQI/cgd1iMcY7v9hE5uVeHjLRKyCLWZEkbM7av4yo4JeSzput2Y3hCAr06cPhP5az2+yVmmUS1Fm6dmzRUlsgiB4wajyjbQFeaOV359L11G17FSYgl4dhgW35Ixq5E6zbwtjRrVYc3X9j+6CpxMkWiqZSU5RNhnrIpcTRgSVnU2inuAvu9ELBPxkka8ZTZGqZfWqUtqfF2USi9kCujLyYTveJ0PQbqUID/wOWUNVV3lLqhd5scxzHAgMBAAECgf9iEAK34vpEHJeP4ThVLySWVbko7S9c3tXSicKuk7SpGLcGTnThLt5gMbmGoXW+TG0GBkswxiENBmPwAUNdIIF+dMAp0eYi4sgg7QXpmuumRe5ux7TRjDxqCyxIWYvqERyv7RfxRvxFvEadqxOeMuY49obejDx5x/ryl0OHrdaSniHSRvCAfTKXdRyRAQ4RadMMM8/PcTr2fnVARbNtdFxfCUAdU4kReyd42Fi4L9osziHmDut3W0TFPmKAS4tFh/eJmvg47WXgsWMS9XQZ9oS2+dRAPaT/BUxaxpWLlvRp1RN91NjRS5eT0YSabGPiIwo/yFPJbh1aFn7rusbI1HkCgYEA+9EIURceZQ8do+jrorvuqFUcTqhJTLpphnJz1QdclkDrPbRj2LoQCXjn0PYdb0HJLASFfCps+lIZ8vn+BT0/g1M9mNmMJ5ijOppGpAkGY+xeyjKERbaYah7cNSHFx3MJbxz4PdV8r4C9UP3rXbn84wR4DmSi3/1A2faGg9gS/OsCgYEAi3Ylsx5TKFDZaA9gWto/jCajhJuBFybR1TRfoqezi0A0y1YgRaQP6svGTQNiVkMT5UYDr6eGV669bFuUckrtGlXUk7qMmsH4jYERisleUJgIHap2VlBTSLJ7hiL1xb1tOcqrAIqGYpp97rMl8kfBdj1Tym4r/3GDGzbUaT+XuJUCgYAEy5Y89RO/GOqXlHfoQWvqCLThSpMawvH/fW53QAyjT9kq86RzHBfyFjtT31vwInCSRgPEuYoZujaESf5sWx46gftKTdo9Zsq08vslZIaaoIWtlAiwyylb2/qViG8bvTUQyJxxkP8u2GTChhNVVZVbPVqL656uZUQ24lrtZ8/0wQKBgF+LUuqzFN+i/D85gZbcvPqkohRAgSE+XDWICxkhcXUuSL0hxTxQ2QLQFow+jEly7Rd/bxkRWY2KzoWE/F+NC4GmWdvXy2pfB4zSZxVBPhdTAQRp+2bI4zYD6XKNUvnk/AbC3YKiZMz68Nnu7ElfdaAvBc/CyOvZdavYVY/BnI09AoGBAMPhv1v46v7qRT/fgJcePxaybW+5eYi6Al6xhdd273nbW99UvJG/oXBS22iUcXb70mjfWUEix8Yfl6AGG3uISqNN5oXntbpdSqJUmtpUKQtMxS53FMTjt93kmjxHnyEKakiptNDUxbFJIhdxKj0aiXgM3HY3LAdAWVnHEFoxPU9W";
	
	// 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApjUGuywchnWat3/h1KqtMNwn6hnQcI3JbxUrItlVp3BMkbuMXOGJra8KZn8i7GjZtQoj8GyT+6PwjYKnFpVWo/BgvqrBlJRxqALmG8O7c+sOiughjC+P13TMndxcj1Sw6ZL8vyOb52sBCaA0PVShM08Q7XfW2QYcsJxkHf0XpFlWOknp09baUXqtkFacBWPf6k1BamNubureQXsaeVmWJQp0VeMQtDk+YZKzb6Dz/SlySWf72WOthaFQawJ9XZH+9+Oa0Vf3H+0ydMZ/dcaN9wLkKze0KQ99kr+CktuPZBlvmwpnjJ3wQHPzHjAylFvk4U18lyrN+EQhcz71SIo+zQIDAQAB";

	// 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
	public static String notify_url = "http://localhost:8080/jja2002_jqwg/front/notify_url.jsp";

	// 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
	public static String return_url = "http://localhost:8080/jja2002_jqwg/front/return_url.jsp";

	// 签名方式
	public static String sign_type = "RSA2";
	
	// 字符编码格式
	public static String charset = "utf-8";
	
	// 支付宝网关
	public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";
	
	// 支付宝网关
	public static String log_path = "C:\\";


//↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

    /** 
     * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
     * @param sWord 要写入日志里的文本内容
     */
  /*  public static void logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }*/
}

